package com.appcheck.recording.action.impl;

import org.json.JSONException;
import org.json.JSONObject;

import android.view.View;

import com.appcheck.recording.action.AbstractAction;
import com.appcheck.recording.action.ActionConvert;
import com.appcheck.recording.handler.AbstractActionHandler;
import com.appcheck.recording.plugin.AbstractActionConverter;

public class ScrollListAction implements AbstractAction, ActionConvert {

	private int line;
	private String parentResourceName;
	private int parentResourceId;
	private View absListView;
	
	public final String toString(){
	    JSONObject localJSONObject = new JSONObject();
	    try
	    {
	      localJSONObject.put("class", "ScrollListAction");
	      localJSONObject.put("resourceName", parentResourceName);
	      localJSONObject.put("resourceId", parentResourceId);
	      localJSONObject.put("line", this.line);
	    }
	    catch (JSONException localJSONException) {}
	    return localJSONObject.toString();
	}
	
	public final View getAbsListView() {
		return absListView;
	}

	public final void setAbsListView(View absListView) {
		this.absListView = absListView;
	}

	public final int getLine() {
		return line;
	}

	public final void setLine(int line) {
		this.line = line;
	}

	public final String getParentResourceName() {
		return parentResourceName;
	}

	public final void setParentResourceName(String parentResourceName) {
		this.parentResourceName = parentResourceName;
	}

	public final int getParentResourceId() {
		return parentResourceId;
	}

	public final void setParentResourceId(int parentResourceId) {
		this.parentResourceId = parentResourceId;
	}

	@Override
	public boolean handle(AbstractActionHandler param) {
		return param.visit(this);
	}

	@Override
	public void toTestCode(AbstractActionConverter actionConverter) {

	}

}
